@section('content')
@if(count($products) > 0)
<ul class="am-g m-products am-avg-md-3 am-thumbnails m-logo-align">
    <?php $count = count($products) - 1;?>
	@foreach($products as $key=>$p)
	  <li>
	  	<a href="{{URL::to('product',$p->id)}}" title="{{$p->name}}" target="_blank">
	    <div class="am-thumbnail">
	      <img src="{{Images::url($p->image,600,720)}}" alt="{{$p->name}}"/>
	      <div class="am-thumbnail-caption">
	        <span class="brand">{{$p->brand}}</span>
	        <div class="name">{{$p->name}}</div>
	        @if($p->discount_price > 0)
	        <div>
	        	<span class="discount-price">¥{{number_format($p->discount_price,2)}}</span>
	        	<span class="price-line-through">¥{{number_format($p->price,2)}}</span>
	        </div>
	        @else
	        <div class="price1">¥{{number_format($p->price,2)}}</div>
	        @endif
	      </div>
	    </div>
	    </a>
	  </li>
	@endforeach
</ul>
@else
	@if(empty($search))
 		<div class="m-products-empty">暂无数据</div>
 	@else
 		<div class="m-products-empty">您的搜索无结果</div>
 	@endif
@endif
<div class="am-u-md-12 am-cf">
  <div class="am-fr">
  	<!-- 分页列表 -->
  	{{$products->links("admin.slider")}}
  </div>
</div>
@stop
